package com.flmes.base.base.result;

import lombok.Getter;

/**
 * @Author: flmes
 * @Date: 2024/9/27 19:25
 */
@Getter
public enum ResultCode {

    /***************** 系统相关 ****************/
    SUCCESS(200, "success"),
    PARAMETER_ERROR(400, "参数错误：%s"),
    UNAUTHORIZED(401, "Unauthorized"),
    METHOD_NOT_ALLOWED(405, "Method Not Allowed"),
    NOT_ACCEPTABLE(406, "Not Acceptable"),
    ERROR(500, "未知异常"),

    /***************** 用户相关 ****************/
    ACCOUNT_NOT_FOUND(301, "账号不存在"),
    PASSWORD_ERROR(302, "密码错误"),

    ;

    private int code;

    private String desc;

    ResultCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

}
